@startuml

' 所有表定义
<#list tableInfos as table>
entity "${table.tableName}" as ${table.tableName} {
   ${table.tableComment!}(${table.columnCount!0}-${table.rowCount!0})
  --
<#if table.columnInfos??>
<#list table.columnInfos as col>
  ${col.columnName} : ${col.columnType}<#if col.columnComment?? && col.columnComment?length gt 0> // ${col.columnComment}</#if>
</#list>
</#if>
}
</#list>

' 外键关系
<#if columnRelations??>
<#list columnRelations as rel>
  ${rel.fkTableName}::${rel.fkColumnName} --> ${rel.refTableName}::${rel.refColumnName}
</#list>
</#if>

@enduml 